const {
  wechatPay,
  wechatPreOrder,
  wechatNotify,
} = require('../../controllers/wechat/pay.js')

const pay = (fastify, opt, done) => {
  /**
   * 获取 产品详情
   */

  fastify.post('/wechat/pay', wechatPay)
  done()
  fastify.post('/wechat/create/order', wechatPreOrder)
  done()
  fastify.post('/wechat/notify', wechatNotify)
  done()
}

module.exports = pay
